package com.ruoyi.mapper;



import com.ruoyi.domain.dao.BookMark;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @auther: zxw
 * @Description //TODO 我改的
 * @date: 2024/11/16 上午10:13
 */

public interface BookMarkMapper {

    @Insert("INSERT INTO t_bookmark(name, lon, lat, height, pitch, heading, roll,base64,create_time)" +
            " VALUES (#{name}, #{lon}, #{lat}, #{height}, #{pitch}, #{heading}, #{roll},#{base64},#{create_time})")
    void addBookMark(BookMark bookMark);

    @Delete("DELETE FROM t_bookmark WHERE id = #{id}")
    void deleteBookMark(Integer id);

    @Select("select * from t_bookmark order by id  desc  limit 15")
    List<BookMark> getBookMarkInfo();

    @Select("select * from t_bookmark where name like '%${name}%'")
    List<BookMark> getInfoByName(BookMark bookMark);
}
